exercise 3.4 solutions